// aside 模板
import icon_form from '@/assets/icon/bs_index_icon_form@2x.png'
import icon_db from '@/assets/icon/bs_index_icon_database@2x.png'
// import icon_product from '@/assets/icon/bs_index_icon_product@2x.png'
import icon_business from '@/assets/icon/bs_index_icon_business@2x.png'
import icon_sys from '@/assets/icon/bs_index_icon_system@2x.png'

/* eslint-disable object-property-newline */
const aside = [
  {
    index: '1-a', img: icon_form, name: '单据管理',
    children: [
      {index: '/invent/list', push: 'invent_list', name: '进货单管理'},
      { index: '/sale/list', push: 'sale_list', name: '销售单管理' },
      { index: '/lendOut/list', push: 'lendOut_list', name: '借出单管理' }
    ]
  },
  {
    index: '1-6', img: icon_form, name: '存货管理',
    children: [
      {index: '/stock/goodsList', push: 'stock_goodsList', name: '商品库存'},
      {index: '/stock/skuList', push: 'stock_skuList', name: 'sku库存'},
      {index: '/stock/codeList', push: 'stock_codeList', name: '串码列表'},
      {index: '/sys/goodsManage', push: 'sys_goods_manage', name: '商品管理'}
    ]
  },
  {
    index: '1-2', img: icon_db, name: '客户管理',
    children: [
      {index: '/business/customer/add', push: 'customerAdd', name: '新增客户'},
      {index: '/business/customer', push: 'customer', name: '客户查询 '}
    ]
  },
  {
    index: '1-4', img: icon_business, name: '行政管理',
    children: [
      {index: '/message/notice', push: 'message_notice', name: '公告管理'},
      {index: '/firm-department', push: 'firmDepartment', name: '部门管理'},
      {index: '/firm-role', push: 'firmRole', name: '角色管理 '},
      {index: '/firm-employees', push: 'firmEmployees', name: '员工管理 '}
    ]
  },
  {
    index: '1-5', img: icon_sys, name: '系统管理',
    children: [
      { index: '/sys/attribute', push: 'sysAttribute', name: '属性管理' },
      // { index: '/sys/indicators', push: 'sys_indicators', name: '业绩管理' },
      { index: '/sys/balanceOfProject', push: 'sys_balanceOfProject', name: '收支项目管理' }
    ]
  }
]

const teach = {
  index: '1-teach', img: icon_business, name: '教学管理',
  children: [
    {index: '/lesson/classroom2', push: 'lesson_classroom', name: '新增课程'},
    {index: '/lesson/collection1', push: 'collection', name: '课程查询'},
    {index: '/lesson/schedule', push: 'lesson_schedule', name: '人工排课'},
    {index: '/lesson/collection3', push: 'collection', name: '签到管理'},
    {index: '/lesson/classes', push: 'lesson_classes', name: '班级管理'}
  ]
}
const seller = {
  index: '1-seller', img: icon_business, name: '销售管理',
  children: [
    {index: '/firm/collection5', push: 'collection', name: '新增商品'},
    {index: '/firm/collection6', push: 'collection', name: '商品管理'},
    {index: '/firm/collection7', push: 'collection', name: '报名管理'},
    {index: '/firm/collection8', push: 'collection', name: '订单管理'}
  ]
}

const lessonBaseType = [
  {index: '/lesson/classroom', push: 'lesson_classroom', name: '教室管理'},
  {index: '/lesson/time', push: 'lesson_time', name: '上课时间管理'}
]

const set0111 = function(aside) {
  const tmp = JSON.parse(JSON.stringify(aside))
  tmp.unshift(seller)
  tmp.unshift(teach)
  tmp.forEach(v => {
    if (v.name === '系统管理') {
      v.children.push(...lessonBaseType)
    }
  })
  return tmp
}

export const type0121 = JSON.parse(JSON.stringify(aside))
export const type0111 = set0111(aside)
